import './assets/main.css'

import { createApp } from 'vue'
// 引入pinia
import { createPinia } from 'pinia'
// 引入element-plus及样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import i18nPlugin from './plugins/i18n'


const app = createApp(App)

app.use(createPinia())
app.use(ElementPlus)
app.use(router)

app.directive('color', (el, binding) => {
    // 这会在 `mounted` 和 `updated` 时都调用
    el.style.color = binding.value
  })
  
app.use(i18nPlugin, {
  greetings: {
    hello: 'Bonjour!'
  }
})
app.mount('#app')
